/**
 * 获取监测评估-》实施评估详情mixins
 */
import {getEvaluation} from "@/api/pim/pim";
import {getfileinfopage} from "@/api/system"
import {getNotNull,dealStartEndDate,getFileTypeFiles} from '@/views/util'
export default function () {
  return {
    data() {
      return {
        evaluationDetailData:[],
      }
    },
    methods: {
      getDetailData_evaluation(id) {
        getEvaluation(id).then(async response => {
          var records = response.data.data
          let files = await getFileTypeFiles(records.fileIds)
          this.evaluationDetailData = [
            {label: '评估名称', value: getNotNull(records.title)},
            {label: '规划成果名称', value: getNotNull(records.achievementTitle)},
            {label: '创建时间', value: getNotNull(records.createTime)},
            {label: '创建人', value: getNotNull(records.createNickname)},
            {label: '附件', files:files},
          ]
        })
      },
    }
  }
}
